import mongoose from '../dbHelper';
import { defaultSchemaExtend, defaultSchemaOptions } from "../config/index";

const Schema = mongoose.Schema;

const EditProductTaskSchema = new Schema(Object.assign({
    products: Array,
    status: {
        type: String,
        enum: ['pending', 'completed', 'failed'],
        default: 'pending'
    },
    configs: Object,
    shopId: Number,
    name: String,
}, defaultSchemaExtend), defaultSchemaOptions);

const EditProductTask = mongoose.model('EditProductTask', EditProductTaskSchema, 'EditProductTasks');

export default EditProductTask